//$Id: Message.java 167 2010-11-06 10:19:43Z cr.carbon $

package builders;


/**
 * This is the class for GUI, TextUI -> Logic interactions
 * 
 * @author Yuling
 * 
 */
public class Message {
	
	private GameState.GameMode gameMode;
	private String[] args;
	
	/**
	 * 
	 * This is the constructor of a Message Class.
	 * 
	 * If gameMode == INITIALIZE, args will contain a String[] of size 9, with player type, and name. e.g. "AI", null, "None", null, "Human", "Yujing" etc., args[9] will have the difficulty level
	 * Else if gameMode == MOVE_PIECE, it will contain the tile number that the currentPlayer wants to move to.
	 * Else if gameMode == BUILD, it will return a String of the Building's name.
	 * 
	 * @param gameMode The gameMode that the UI is currently in/will want to change into
	 * @param args 	   Any extra args that will be needed, will be left null otherwise
	 */
	public Message(GameState.GameMode gameMode, String[] args){
		this.gameMode = gameMode;
		this.args = args;
	}
	
	/**
	 * This method will return the GameMode of the Message
	 * 
	 * @return gameMode of the game (gameMode that UI is currently in, or gameMode that UI wants to go)
	 */
	public GameState.GameMode getGameMode(){
		return gameMode;
	}
	
	/**
	 * This method will return the arguments of the Message in a String[] array.
	 * 
	 * @return the args of the Message
	 */
	public String[] getArgs(){
		return args;
	}

}
